package cn.bgs.mapper;

import cn.bgs.pojo.TopUp;
import cn.bgs.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BillMapper {
    List<TopUp> selectAll(String userName);

    @Select("SELECT user_id,user_name FROM community_usermanagement.`user`")
    @Results(
            {@Result(property = "userId", column = "user_id"),
                    @Result(property = "userName", column = "user_name")})
    List<User> userNameSelect();

    int billDelete(Integer topUpId);

    int billAdd(TopUp topUp);

    int billUpdate(TopUp topUp);
}
